home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmMain
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "VB*Alyzer"
- ClientHeight = 5865
- ClientLeft = 1095
- ClientTop = 8130
- ClientWidth = 7350
- Height = 6555
- Icon = FRMMAIN.FRX:0000
- Left = 1035
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 5865
- ScaleWidth = 7350
- Top = 7500
- Width = 7470
- Begin CommonDialog dlg
- Left = 7320
- Top = 5280
- End
- Begin SSFrame frmTab
- Caption = "Metric Options"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 5655
- Index = 2
- Left = 120
- TabIndex = 12
- Top = 120
- Width = 7095
- Begin SSCommand cmdOptOK
- Caption = "&OK"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 3960
- RoundedCorners = 0 'False
- TabIndex = 35
- Top = 5040
- Width = 1455
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 1
- Left = 240
- TabIndex = 34
- Top = 360
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 2
- Left = 240
- TabIndex = 33
- Top = 720
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 3
- Left = 240
- TabIndex = 32
- Top = 1080
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 4
- Left = 240
- TabIndex = 31
- Top = 1440
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 5
- Left = 240
- TabIndex = 30
- Top = 1800
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 6
- Left = 240
- TabIndex = 29
- Top = 2160
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 7
- Left = 240
- TabIndex = 28
- Top = 2520
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 8
- Left = 240
- TabIndex = 27
- Top = 2880
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 9
- Left = 240
- TabIndex = 26
- Top = 3240
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 10
- Left = 240
- TabIndex = 25
- Top = 3600
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 11
- Left = 3720
- TabIndex = 24
- Top = 360
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 12
- Left = 3720
- TabIndex = 23
- Top = 720
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 13
- Left = 3720
- TabIndex = 22
- Top = 1080
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 14
- Left = 3720
- TabIndex = 21
- Top = 1440
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 15
- Left = 3720
- TabIndex = 20
- Top = 1800
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Index 0 - DO NOT USE"
- Enabled = 0 'False
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 0
- Left = 1560
- TabIndex = 19
- Top = 3960
- Value = -1 'True
- Visible = 0 'False
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 16
- Left = 3720
- TabIndex = 18
- Top = 2160
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 17
- Left = 3720
- TabIndex = 17
- Top = 2880
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 18
- Left = 3720
- TabIndex = 16
- Top = 2520
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 19
- Left = 3720
- TabIndex = 15
- Top = 3240
- Value = -1 'True
- Width = 3135
- End
- Begin SSCheck chkOpt
- Caption = "Check3D1"
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 255
- Index = 20
- Left = 3720
- TabIndex = 14
- Top = 3600
- Value = -1 'True
- Width = 3135
- End
- Begin SSCommand cmdExit
- Caption = "E&xit"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Index = 2
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 13
- Top = 5040
- Width = 1455
- End
- End
- Begin SSFrame frmTab
- Caption = "Analysis"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 5655
- Index = 1
- Left = 120
- TabIndex = 8
- Top = 120
- Visible = 0 'False
- Width = 7095
- Begin SSCommand cmdPrint
- Caption = "&Print"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 3960
- RoundedCorners = 0 'False
- TabIndex = 11
- Top = 5040
- Width = 1455
- End
- Begin Grid grdAnal
- FixedCols = 0
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 4575
- Left = 240
- TabIndex = 10
- Top = 360
- Width = 6735
- End
- Begin SSCommand cmdExit
- Caption = "E&xit"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Index = 1
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 9
- Top = 5040
- Width = 1455
- End
- End
- Begin SSFrame frmTab
- Caption = "Files For Analysis"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 5655
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 120
- Visible = 0 'False
- Width = 7095
- Begin ListBox lstFiles
- Height = 5100
- Left = 120
- Sorted = -1 'True
- TabIndex = 7
- Top = 360
- Width = 5175
- End
- Begin SSCommand cmdRemove
- Caption = "Remove"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 6
- Top = 3360
- Width = 1455
- End
- Begin SSCommand cmdReopen
- Caption = "Re-open"
- Enabled = 0 'False
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 5
- Top = 960
- Width = 1455
- End
- Begin SSCommand cmdOpen
- Caption = "Open..."
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 4
- Top = 360
- Width = 1455
- End
- Begin SSCommand cmdAnalyze
- Caption = "Analyze"
- Enabled = 0 'False
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 3
- Top = 4080
- Width = 1455
- End
- Begin SSCommand cmdExit
- Caption = "E&xit"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Index = 0
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 2
- Top = 5040
- Width = 1455
- End
- Begin SSCommand cmdLocalsOnly
- Caption = "Locals &Only"
- Font3D = 1 'Raised w/light shading
- ForeColor = &H00000000&
- Height = 495
- Left = 5520
- RoundedCorners = 0 'False
- TabIndex = 1
- Top = 2160
- Width = 1455
- End
- End
- Begin Menu mnuFile
- Caption = "&File"
- Begin Menu mnuFileExit
- Caption = "E&xit"
- Shortcut = ^X
- End
- End
- Begin Menu mnuFrame
- Caption = "F&rame"
- Begin Menu mnuFrameEntry
- Caption = "&1: Files"
- Index = 0
- Shortcut = ^F
- End
- Begin Menu mnuFrameEntry
- Caption = "&2: Analysis"
- Index = 1
- Shortcut = ^A
- End
- Begin Menu mnuFrameEntry
- Caption = "&3: Options"
- Index = 2
- Shortcut = ^O
- End
- End
- Option Explicit
- Const FRM_FILES = 0
- Const FRM_ANALYSIS = 1
- Const FRM_OPTIONS = 2
- Sub cmdAnalyze_Click ()
- AnalyzeCurrentProject lstFiles, grdAnal
- SwitchFrameTo FRM_ANALYSIS
- End Sub
- Sub cmdExit_Click (Index As Integer)
- Terminate
- Unload frmMain
- End
- End Sub
- Sub cmdLocalsOnly_Click ()
- Dim intIdx As Integer
- ' Work through the list, removing anything with a \
- ' Start at the end, because removing items causes the
- ' ListCount to be reduced.
- For intIdx = lstFiles.ListCount - 1 To 0 Step -1
- If InStr(lstFiles.List(intIdx), "\") Then
- lstFiles.RemoveItem intIdx
- End If
- Next
- End Sub
- Sub cmdOpen_Click ()
- OpenProject lstFiles, dlg
- cmdReopen.Enabled = True
- cmdAnalyze.Enabled = True
- End Sub
- Sub cmdOptOK_Click ()
- Dim i As Integer
- ' Store option values
- For i = 1 To NumMetrics()
- SetMetricDisplay i, chkOpt(i).Value
- Next
- ' Switch to Files tab
- SwitchFrameTo FRM_FILES
- End Sub
- Sub cmdPrint_Click ()
- PrintResults grdAnal
- End Sub
- Sub cmdRemove_Click ()
- If lstFiles.ListIndex >= 0 Then
- lstFiles.RemoveItem lstFiles.ListIndex
- End If
- End Sub
- Sub cmdReopen_Click ()
- ReopenProject lstFiles
- End Sub
- Sub Form_Load ()
- Initialise
- grdAnal.Rows = 1
- grdAnal.FixedCols = 0
- Me.Show
- DoEvents
- SwitchFrameTo VisibleFrame()
- SetOptions
- End Sub
- Sub Form_Unload (Cancel As Integer)
- Terminate
- End
- End Sub
- Sub lstFiles_DblClick ()
- lstFiles.RemoveItem lstFiles.ListIndex
- End Sub
- Sub mnuFileExit_Click ()
- Unload Me
- End Sub
- Sub mnuFrameEntry_Click (Index As Integer)
- SwitchFrameTo Index
- End Sub
- Sub SetOptions ()
- Dim intNumOpts As Integer
- Dim i As Integer
- intNumOpts = NumMetrics()
- For i = 1 To intNumOpts
- chkOpt(i).Caption = MetricLongName(i)
- chkOpt(i).Value = DisplayMetric(i)
- Next
- End Sub
- Sub SwitchFrameTo (intNewFrame As Integer)
- Static intOldFrame As Integer
- Dim i As Integer
- ' handle changes to display options when switching into and
- ' out of the options page...
- If intOldFrame = 2 Then
- For i = 1 To NumMetrics()
- SetMetricDisplay i, chkOpt(i).Value
- Next
- Else
- If intNewFrame = 2 Then
- SetOptions
- End If
- End If
- frmTab(intOldFrame).Visible = False
- intOldFrame = intNewFrame
- frmTab(intNewFrame).Visible = True
- End Sub
- Function VisibleFrame () As Integer
- Dim i
- For i = 0 To 2
- If frmTab(i).Visible Then
- VisibleFrame = i
- End If
- Next
- End Function
-